package org.liang.query;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 基础查询对象
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseQuery {
    private String sortField;
    private String sortType;
    //查询条件
    private String key;
    //有公共属性-分页
    private Integer page; //当前页
    //每页显示条数
    private Integer rows;
    //获取起始条数
    public int getStart(){
        return (this.page-1)*this.rows;
    }

}
